package com.bluej.redis.tools;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

public class RedisUtil2 {
	
	public  JedisPool jedisPool;

	public JedisPool getJedisPool() {
		return jedisPool;
	}

	public void setJedisPool(JedisPool jedisPool) {
		this.jedisPool = jedisPool;
	}
	
	public  void set(String key,String value){
		Jedis jedis = jedisPool.getResource();
		//System.out.println(jedis);
		jedis.set(key, value);
	}

	public  String get(String key){
		Jedis jedis = jedisPool.getResource();
		//System.out.println(jedis);
		String value="";
		jedis.get(key);
		return value;
	}
}
